﻿<UserControl x:Class="Mengsk.ProxyDelivery.App.UI.Goods.GoodsFixUserControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
             d:DesignHeight="300" d:DesignWidth="800">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        
        <StackPanel Grid.Row="0" Margin="3" Orientation="Horizontal" VerticalAlignment="Center">
            <TextBlock Text="创建时间:" Margin="3" VerticalAlignment="Center"/>
            <xctk:DateTimePicker Grid.Row="1" xctk:Format="Custom"  xctk:TimeFormatString="yyyy-MM-dd HH:mm:ss" Grid.Column="5" Name="dpEnd" Margin="3" VerticalAlignment="Center" MinWidth="140"/>
            <Button Name="btnQuery" Margin="3" VerticalAlignment="Center" Content="查询" Width="60" Click="btnQuery_Click"/>
            <Button Name="btnProcess" Margin="3" VerticalAlignment="Center" Content="修复" Width="60" Click="btnProcess_Click"/>
        </StackPanel>
        
        <DataGrid Grid.Row="1" Margin="3" Name="dgvGoods" AutoGenerateColumns="False">
            <DataGrid.Columns>
                <DataGridTextColumn Header="商品编号" Binding="{Binding Source.Id}"/>
                <DataGridTextColumn Header="货号" Binding="{Binding Source.Number}"/>
                <DataGridTextColumn Header="创建时间" Binding="{Binding Source.CreateTime,Converter={StaticResource datetimeConverter}}"/>
                <DataGridTextColumn Header="更新时间" Binding="{Binding Source.UpdateTime,Converter={StaticResource datetimeConverter}}"/>
                <DataGridTextColumn Header="最后出售时间" Binding="{Binding Source.LastSellTime,Converter={StaticResource datetimeConverter}}"/>
                <DataGridTextColumn Header="处理状态" Binding="{Binding State}"/>
                <DataGridTextColumn Header="URL" Binding="{Binding Source.Url}"/>
            </DataGrid.Columns>
        </DataGrid>
        
    </Grid>
</UserControl>
